Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports System.Windows.Forms
Imports C4F.DevKit.Calendar.Components

Namespace C4F.DevKit.Calendar.Samples
	Public Partial Class ImportAppointmentDialog
		Inherits Form
		Private _selectDialog As SelectAppointmentDialog

		Public Sub New(ByVal selectDialog As SelectAppointmentDialog, ByVal filePath As String)
			InitializeComponent()

			_selectDialog = selectDialog
			calendarService1.CalendarFilePath = filePath
			appointmentsList1.CalendarService = calendarService1
			appointmentsList1.RefreshList()
		End Sub

		Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
			Close()
		End Sub

		Private Sub btnImport_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnImport.Click
			_selectDialog.Import(appointmentsList1.SelectedAppointment)
			Close()
		End Sub
	End Class
End Namespace
